import 'index.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(

        primarySwatch: Colors.blue,

        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: LoginRoute(),

      //注册路由表
      routes: {
        "login": (context) => LoginRoute(),

        "home_page": (context) => HomePageRoute(),

        "bookmarks":  (context) {

          return Scaffold(
            appBar: AppBar(
              title: Text('书签'),
            ),
            body: BookMarksRoute()
          );
        },

        "catgary":  (context) => CatgaryRoute(),
      },
    );
  }
}


